# 作者    : 周  文  俊
# 编写时间 :2024/10/23  15:08
from django import template

register = template.Library()


@register.filter
def get_item(dictionary, key):
    return dictionary.get(key, None)


@register.filter
def get_value(dictionary, key):
    if dictionary is not None:
        return dictionary.get(key, None)
    return None
